package com.cqhilink.iot.jobstandardmanagement.facade.service;

import com.cqhilink.iot.jobstandardmanagement.facade.model.Employee;
import com.cqhilink.iot.jobstandardmanagement.facade.model.EmployeeVo;
import com.cqhilink.iot.jobstandardmanagement.facade.model.Ztree;

import java.util.List;

/**
 * Created by zmling on 2016/12/14.
 */

/**
 * 人员信息
 */
public interface OutEmployeeService {

    /**
     * 查询所有人员信息
     *
     * @param employee
     * @return
     * @throws Exception
     */
    List<EmployeeVo> findEmployeeList(Employee employee) throws Exception;


    /**
     * 查询登陆ID
     *
     * @param employee
     * @return
     * @throws Exception
     */
    List<EmployeeVo> findEmployeeByLoginId(Employee employee) throws Exception;


    /**
     * 加载人员混合树
     * @param orgId
     * @param sync
     * @param openOrg
     * @param openDept
     * @param keyword
     * @return
     * @throws Exception
     */
    List<Ztree> loadEmployeeZtree(String orgId, boolean sync, boolean openOrg, boolean openDept, String keyword) throws Exception;

    /**
     * @param orgId               = null 查询全部组织机构
     * @param isLoadDept          = true 加载组织部门树
     * @param isLoadOrgEmployee   = true 加载组织机构人员
     * @param isALoadDeptEmployee = true 加载组织部门人员
     * @param maxLevel            最大层级码
     * @param lessLevel           最小层级码
     */
    public List<Ztree> loadEmployeeZtree(String orgId, boolean isLoadOrg, boolean isLoadDept,
                                         boolean isLoadOrgEmployee, boolean isALoadDeptEmployee,
                                         String maxLevel,String lessLevel, String keyword) throws Exception ;
    /**
     * 根据ID查询信息
     *
     * @param employeeId
     * @return Employee
     * @Author 卢曼成
     */
    Employee findById(String employeeId);

    /**
     * 根据ID集合查询数据
     *
     * @param list
     * @return
     */
    List<Employee> selectByKeyList(List<String> list);

    /**
     * 查询作业区下所有角色名称为XXX的人员
     * Author:cp
     */
    List<Employee> queryEmployeeByAreaOrgIdAndRoleName(String areaOrgId,String roleName);
}
